3 import java
.awt
.Rectangle
;
4 import java
.util
.Observable
;
6 public class GraphVertex
extends Observable
{
8 private Rectangle shape
;
9 private boolean selected
;
11 public boolean isSelected(){
16 public GraphVertex(String name
){
18 shape
= new Rectangle();
35 public void setX(int x
){
40 public void setY(int y
){
45 public synchronized void setChanged() {
50 public int getWidth(){
54 public void setWidth(int w
){
59 public void setHeight(int h
){
64 public int getHeight(){
68 public boolean isAt(int x
, int y
){
69 if(x
>= shape
.x
&& x
<= shape
.x
+ shape
.width
)
70 if(y
>= shape
.y
&& y
<= shape
.y
+ shape
.height
)
75 public void setSelected(boolean flag
){
80 public String
getName() {
84 public void setName(String name
) {